#!/bin/bash

LEXICAL_ANALYSER_DIRECTORY="javacompiler/lex"

SYNTATIC_ANALYSER_PACKAGE="javacompiler.syntax"
SYNTATIC_ANALYSER_DIRECTORY="javacompiler/syntax"

java -cp JFlex.jar JFlex.Main -d $LEXICAL_ANALYSER_DIRECTORY java_compiler.jflex
java -jar cup.jar -expect 10000 -parser JavaSyntaxAnalyser -package $SYNTATIC_ANALYSER_PACKAGE java_compiler.cup

mv JavaSyntaxAnalyser.java sym.java $SYNTATIC_ANALYSER_DIRECTORY 
